<template>
  <div class="cart-list">
    <cart-listitem
      v-for="(item, index) in cartList"
      :key="index"
      :product="item"
    ></cart-listitem>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
import CartListitem from "@/views/cart/chil/CartListitem";
export default {
  name: "CartList",
  components: {
    CartListitem,
  },
  computed: {
    //Vuex中的getters中映射计算属性
    ...mapGetters(["cartList"]),
  },
};
</script>

<style scoped>
</style>